const express = require("express")
const router = express.Router()
// 引入控制层
const attendsController = require("../controllers/attendsController")
const { body, query } = require("express-validator")
// 引入中间件
const checkPermission = require('../middleware/checkPermission');
const auth = require('../middleware/auth');

router.post('/add', auth, checkPermission("attend_add"), attendsController.add)
router.get('/del_f', auth, checkPermission("attend_delete"), attendsController.del_f)
router.get('/del_t', auth, checkPermission("attend_delete"), attendsController.del_t)
router.get('/get', auth, checkPermission("attend_list"), attendsController.get)
router.post('/set', auth, checkPermission("attend_edit"), attendsController.set)
router.get('/list',auth, checkPermission("attend_list"), attendsController.list)
router.get('/allStudent', attendsController.allStudent)
router.get('/ToStudentid', attendsController.studentIdTo)

module.exports = router